package com.runtu.domain.trade.adapter.repository;

import com.runtu.domain.trade.model.aggregate.GroupBuyOrderAggregate;
import com.runtu.domain.trade.model.aggregate.GroupBuyTeamSettlementAggregate;
import com.runtu.domain.trade.model.entity.*;
import com.runtu.domain.trade.model.valobj.GroupBuyProgressVO;

import java.util.List;

/**
 * @ClassName ITradeRepository
 * @Description 操作数据库
 * @date 2025/8/6 10:02
 * @Version 1.0
 */

public interface ITradeRepository {


    public MarketPayOrderEntity queryMarketPayOrderByOutTradeNo(String userId, String outTradeNo);

    public GroupBuyProgressVO querygroupbuyprogress(String teamId);

    public MarketPayOrderEntity lockMarketPayOrder(GroupBuyOrderAggregate groupBuyOrderAggregate);

    GroupBuyActivityEntity queryGroupBuyActicityByActivityId(Long activityId);

    Integer queryOrderCountByActivityId(Long activityId, String userId);

    GroupBuyTeamEntity queryGroupBuyTeamByTeamId(String teamId);

    void settlementMarketPayOrder(GroupBuyTeamSettlementAggregate groupBuyTeamSettlementAggregate);

    boolean isSCBlackIntercept(String source, String channel);

    int updateNotifyTaskStatusSuccess(String teamId);

    int updateNotifyTaskStatusError(String teamId);

    int updateNotifyTaskStatusRetry(String teamId);

    List<NotifyTaskEntity> queryUnExecutedNotifyTaskList(String teamId);
    List<NotifyTaskEntity> queryUnExecutedNotifyTaskList();
}
